package yzserver.sx4a;

import yzserver.sx4a.form.Ret;

/**
 * Created with IntelliJ IDEA.
 * User: andrew
 * Date: 14-8-18
 * Time: 下午2:15
 * To change this template use File | Settings | File Templates.
 */
public  class RetTools {
    public static Ret getRet(String tip,Exception e){
        Ret ret = new Ret();
        if(e == null){
            ret.setCode("true");
            ret.setMessage(tip);
        }else{
            ret.setCode("false");
            ret.setMessage(tip+" : "+e.getCause().getCause());
        }
        return ret;
    }
}
